/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       combat_spell_single_target.h

	$Header: /game/combat_spell_single_target.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef COMBAT_SPELL_SINGLE_TARGET_H_INCLUDED
#define COMBAT_SPELL_SINGLE_TARGET_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_creature_ptr.h"
#include "combat_spell.h"

class t_combat_ai;

// -----------------------------------------------------------------
// single target curse-type spells
// -----------------------------------------------------------------
class t_combat_spell_single_target : public t_combat_spell
{
public:
	t_combat_spell_single_target( t_battlefield& battlefield, t_spell spell );

	virtual bool			begin_casting();
	virtual bool		    can_cast( t_screen_point const& point ) const;
	virtual void			cast_and_mirror( t_combat_creature_ptr target, int power );
	virtual bool			cast_on( t_combat_creature_ptr caster, 
		                             t_combat_creature_ptr target, 
									 int power,
									 bool is_mirror );
	virtual void            execute( t_combat_creature& caster );
	virtual void            execute_mirror_spell( t_combat_creature_ptr creature, int power );
	virtual t_combat_ai_action_list generate_combat_ai_action_list(t_combat_ai &owner);
	virtual t_mouse_window* mouse_move( t_screen_point const& point,
										std::string& help_text );
	virtual bool            left_click( t_screen_point const& point );
	void                    set_target( t_combat_creature_ptr spell_target );

protected:
	virtual t_mouse_window*	get_spell_cursor() const;

	t_combat_creature_ptr m_spell_target;
};

inline t_combat_spell_single_target::t_combat_spell_single_target( t_battlefield& battlefield,
																   t_spell spell )
                                   : t_combat_spell( battlefield, spell )
{
}

inline void t_combat_spell_single_target::set_target( t_combat_creature_ptr spell_target )
{
	m_spell_target = spell_target;
}


#endif // COMBAT_SPELL_SINGLE_TARGET_H_INCLUDED